/**
 * 
 */
package com.gs.coursera.algorithms.core.graph;

import com.gs.coursera.algorithms.core.graph.Edge;
import com.gs.coursera.algorithms.core.graph.Graph;

/**
 * @author Sabuj
 *
 */
public abstract class MinimumSpaningTree<T, W extends Comparable<W>> {

	protected Graph<T, W> graph;
	protected Iterable<Edge<T, W>> edges;
	protected W totalWeight;
	
	public MinimumSpaningTree(Graph<T, W> graph) {
		this.graph = graph;
	}

	public abstract Iterable<Edge<T, W>> findMst();
	
	public abstract W getTotalWeight();
	
	public void print(){
		if(null != edges)
			for (Edge<T, W> e : edges) {
				System.out.print(e.getStartVertex().getValue() + " - " + e.getEndVertex().getValue());
			}
	}
}
